
#include "gmsh.h"

ElementMaps _element_maps = build_element_maps();

ElementMaps build_element_maps()
{
  ElementMaps em;
//  em.in.insert(std::make_pair(15, ElementDefinition(NODE1, NODE1, 0, 1)));
//
//  // Add elements with trivial node mappings
//  em.add_def(ElementDefinition(EDGE2, EDGE2));
//  em.add_def(ElementDefinition(EDGE3, 8, 1, 3));
//  em.add_def(ElementDefinition(TRI3, 2, 2, 3));
//  em.add_def(ElementDefinition(TRI6, 9, 2, 6));
//  em.add_def(ElementDefinition(QUAD4, 3, 2, 4));
//  em.add_def(ElementDefinition(QUAD8, 16, 2, 8));
//  em.add_def(ElementDefinition(QUAD9, 10, 2, 9));
//  em.add_def(ElementDefinition(HEX8, 5, 3, 8));
//  em.add_def(ElementDefinition(TET4, 4, 3, 4));
//  em.add_def(ElementDefinition(PRISM6, 6, 3, 6));
//  em.add_def(ElementDefinition(PRISM15, 13, 3, 15));
//  em.add_def(ElementDefinition(PYRAMID5, 7, 3, 5));
//
//
//  // HEX20
//  {
//    ElementDefinition eledef(HEX20, 17, 3, 20);
//    const unsigned int nodes[] = {0,1,2,3,4,5,6,7,8,11,12,9,13,10,14,15,16,19,17,18};
//    std::vector<unsigned int>(nodes, nodes+eledef.nnodes).swap(eledef.nodes); // swap trick
//    em.add_def(eledef);
//  }
//
//  // HEX27
//  {
//    ElementDefinition eledef(HEX27, 12, 3, 27);
//    const unsigned int nodes[] = {0,1,2,3,4,5,6,7,8,11,12,9,13,10,14,
//                                  15,16,19,17,18,20,21,24,22,23,25,26};
//    std::vector<unsigned int>(nodes, nodes+eledef.nnodes).swap(eledef.nodes); // swap trick
//    em.add_def(eledef);
//  }
//
//  // TET10
//  {
//    ElementDefinition eledef(TET10, 11, 3, 10);
//    const unsigned int nodes[] = {0,1,2,3,4,5,6,7,9,8};
//    std::vector<unsigned int>(nodes, nodes+eledef.nnodes).swap(eledef.nodes); // swap trick
//    em.add_def(eledef);
//  }
//
//  // PRISM18
//  {
//    ElementDefinition eledef(PRISM18, 13, 3, 18);
//    const unsigned int nodes[] = {0,1,2,3,4,5,6,8,9,7,10,11,12,14,13,15,17,16};
//    std::vector<unsigned int>(nodes, nodes+eledef.nnodes).swap(eledef.nodes); // swap trick
//    em.add_def(eledef);
//  }

  return em;
}
